#ifndef TILEBEHAVIOUR_CPP
#define TILEBEHAVIOUR_CPP

#include "tilebehaviour.h"

bool CTileStraightBehaviour::givePtr(Vector3d vec, const Vector3d& tile_pos)
{
    vec.Z--;
    return ( vec == tile_pos );
}

bool CTileWeirdBehaviour::givePtr(Vector3d vec, const Vector3d& tile_pos)
{
    vec.Z--;
    Vector3d no(-1,0,1); // should const member, would spare the time of construction and destruction at each call of the method
    Vector3d ne(0,1,1);
    Vector3d so(0,-1,-1);
    Vector3d se(1,0,-1);
    return ( ( (vec + no) == tile_pos ) || ( (vec + ne) == tile_pos ) || ( (vec + so) == tile_pos ) || ( (vec + se) == tile_pos ) );
}

#endif // TILEBEHAVIOUR_CPP
